<?php

class LinkReservedValidator extends CValidator
{
	public $message = "Value is reserved.";
	private $reserved = array('test', 'get', 'post', 'user', 'activity', 'site', 'place', 'overview', 'event', 'promotion', 'signin', 'login', 'signup');
	
	protected function validateAttribute($object, $attribute)
	{
		$search = array_search($object->{$attribute},$this->reserved);
		if($search !== false) {
			$this->addError($object, $attribute, $this->message);
		}
	}
	
	public function clientValidateAttribute($object,$attribute){}
}